//待接单

import { get, post, remove, put } from '@/server/request'
import { baseApi, baseApp } from '@/server/base'

export function getCurrentShift(params?: object) {
  return get(`${baseApi}/api/apk/shift`, params)
}

//获取jam code 信息
export function getJamMethodInfo(jamCode: string) {
  return get(`${baseApi}/api/apk/configs/jams?code=${jamCode}`)
}

/**
 * 获取首页任务统计
 * @returns
 */
export function getHomeStatistics() {
  return get(`${baseApi}/api/apk/tasks/num`)
}

/**
 * 根据日期获取 task任务
 */
export function getTaskDataList(date: string) {
  return get(`${baseApi}/api/apk/tasks/calendar?date=${date}`)
}

/**
 * 获取任务详情
 * @param id
 */
export function getTaskDetail(id: string | number) {
  return get(`${baseApi}/api/apk/tasks/show/${id}`)
}

/**
 * 上传图片路径
 */
export const uploadImagePath = `${baseApi}/api/apk/upload`

export type uploadImageType = {
  user: string
  disk: string
  path: string
  file_name: string
  size: number
  format_size: string
  original_name: string
  module: string
  updated_at: string
  created_at: string
  id: string | number
}
